import config from "@/config"
import http from "@/utils/request"

export default {
    addPost: {
        url: `${config.API_URL}/platform/post/add`,
        name: "新增岗位",
        post: function (platformPostAddVo) {
            return http.post(this.url, platformPostAddVo);
        }
    },
    delPosts: {
        url: `${config.API_URL}/platform/post/del`,
        name: "多选级联删除岗位",
        delete: function (postIds) {
            return http.delete(this.url, postIds);
        }
    },
    editPost: {
        url: `${config.API_URL}/platform/post/edit`,
        name: "修改岗位信息",
        put: function (platformPostEditVo) {
            return http.put(this.url, platformPostEditVo);
        }
    },
    getPostById: {
        url: `${config.API_URL}/platform/post/info`,
        name: "根据ID获取岗位详情",
        get: function (postId) {
            return http.get(this.url + "/" + postId);
        }
    },
    pageListPost: {
        url: `${config.API_URL}/platform/post/pageList`,
        name: "分页查询岗位列表",
        get: function (platformPostQueryVo) {
            return http.get(this.url, platformPostQueryVo);
        }
    }
}
